import http from "@/utils/fetch.js";
// 登录接口
export const login = params => http("/wuliu/user/login", params, "POST");
// 注册接口
export const register = params => http("/wuliu/user/add", params, "POST");
// 获取用户分页
export const getUserlist = params => http("/wuliu/user/getUser", params, "GET");
// 退出登录
export const exitLogin = params => http("/wuliu/user/logout", params, "GET");
//修改用户信息
export const updateUser = params => http("/wuliu/user/update", params, "POST");
// 删除用户信息
export const deleteUser = params =>
  http("/wuliu/user/delete", params, "DELETE");
//获取Y列表
export const getOrderlist = params =>
  http("/wuliu/order/getorder", params, "GET");

//获取员工信息分页
export const geteMployee = params =>
  http("/wuliu/employee/getemployee", params, "GET");

// 增加订单
export const addOreder = params => http("/wuliu//order/add", params, "POST");

// 员工登录
export const userLogin = params =>
  http("/wuliu/employee/login", params, "POST");

// 根据员工ID获取订单
export const UserOrderid = params =>
  http("/wuliu/employee/getOrderByEmployeeId", params, "GET");

// 根据用户id获取订单
export const personalList = params =>
  http("/wuliu/order/getByUserId", params, "GET");

// 根据用户id获取用户
export const getUserdata = params => http("/wuliu/user/getById", params, "GET");

// 员工订单绑定
export const getUserOrder = params =>
  http("/wuliu/employee/test", params, "GET");
// 增加员工
export const addPerson = params => http("/wuliu/employee/add", params, "POST");
// 更新员工
export const updateStaff = params =>
  http("/wuliu/employee/update", params, "POST");
// 更新订单资料
export const updataOrder = params =>
  http("/wuliu/order/update", params, "POST");

// 根据id删除订单
export const deleteOrderId = params =>
  http("/wuliu/order/deleteById", params, "POST");

// 删除员工
export const deteteUserId = params =>
  http("/wuliu/employee/deleteById", params, "POST");

// 根据id查找员工
export const getByidorder = params =>
  http("/wuliu/employee/getById", params, "GET");
